<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="bigboxbody" id="bigboxbody">
<{if $smarty.get.type=='changepoints'}>
<form action="module.php?m=member&s=member_unify.php" method="post" name="unify" id="unify">
<table class="table3" width="100%" style="margin-top:30px;">
    <tbody>
	<tr>
        <td>积分</td><td>=</td><td>当前积分</td>
        <td><select name="fun">
        	<option value="+">+</option>
        	<option value="-">-</option>
        </select>
        <input type="text" name="points" value="" style="width:30px;" />
        </td>
        <td>
        原因：
        <input type="text" name=desc value="" /></td></tr>
        <tr><td colspan="5" align="center">
        <input type="button" id="unify_buttom" class="btn" value="保存" onclick="ajaxpost('unify');"></td>
    </tr>
    </tbody>
</table>
<input type="hidden" name="act" value="changepoints">
<input type="hidden" name="member_id" value="<{$smarty.get.member_id}>">
</form>
<script>
function $$(id) {
	return !id ? null : document.getElementById(id);
}
function ajaxpost(formid) {
	
	var ajaxframeid = 'ajaxframe';
	var ajaxframe = $$(ajaxframeid);
	if(!ajaxframe){
		var div = document.createElement('div');
		div.style.display = 'none';
		div.innerHTML = '<iframe name="' + ajaxframeid + '" id="' + ajaxframeid + '" loading="1"></iframe>';
		ajaxframe = $$(ajaxframeid);
		$$('bigboxbody').appendChild(div);
	}
	$$(formid).target = ajaxframeid;
	$$(formid).submit();
	window.parent.main.document.location.reload();

	
}
</script>

<{elseif $smarty.get.type=='showpointslogs'}>
<table class="table3" width="100%">
  <tbody>
	<tr>
	<td>积分增减</td>
  <td>原因</td>
  <td>时间</td>
  </tr>
	<{foreach item=item key=key from=$pointslogs}>
	<tr>
	<td><{$item.points}></td>
  <td><{$item.desc}></td>
  <td><{$item.create_time}></td>
    </tr>
	<{/foreach}>
 </tbody>
</table>
<{/if}>

</div>
</body>
</html>